package com.chaodroid.flyui.view.viewpager.adapter;

import android.support.v4.app.Fragment;

import java.util.List;

/**
 * Created by CHEN on 2018/1/16.
 */

public abstract class FragmentFactory {

    private List<String> mTitles  = null;

    private List<Fragment> mFragments = null;

    public FragmentFactory(List<String> titles, List<Fragment> fragments) {
        mTitles = titles;
        mFragments = fragments;
    }

//    public String getTitle(int position) {
//
//        return mTitles.get(position);
//    }
//
//    public Fragment getFragment(int position) {
//
//        return mFragments.get(position);
//    }

    public List<String> getTitles() {
        return mTitles;
    }

    public List<Fragment> getFragments() {
        return mFragments;
    }

    abstract public Fragment newFragmentInstance(int position);

}


